package com.mastercard.labs

import static org.junit.Assert.*
import org.junit.*

class CardServiceTests {

	def cardService
	
    @Before
    void setUp() {
        // Setup logic here
    }

    @After
    void tearDown() {
        // Tear down logic here
    }

    @Test
    void testGetCards() {
        def user = User.findByUsername("ZHONGDE")
		def cards = cardService.getCards(user)
		def userCards = UserCard.findAllByUser(user)
		
		for (UserCard userCard in userCards) {
			assertTrue (userCard.card in cards)
		}
		
		assertTrue (cards.size() == userCards.size())
		assertTrue (cards.size() == 5)
    }
	
	@Test
	void testUser() {
		
	}
}
